<jsp:useBean id="stockpageInfo" scope="request" type="com.github.pagehelper.Page"/>
<div1 class="container" style="float: right">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <smla>进货列表----------显示所有进货</smla>
                </h1>
            </div>
        </div>
        <div class="row" >
            <div class="col-md-4 colum">
                <%--                toaddbook--%>
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/stock/redirctadd">新增订单</a>
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/stock/getStock">显示全部订单</a>
            </div>
        </div>
        <div class="col-md-4 column">


        </div>
        <div class="row">
            <div class="col-md-4 colum" style="display: inline">

                <%--               查询书籍--%>
                <form action="${pageContext.request.contextPath}/product/queryProductbyname"   method="post" style="float:right;display: inline "  class="form-inline">
                    <input type="text" class="form-control" name="name" placeholder="请输入要查询用品名称"  style="display: inline-block"/>
                    <input type="submit" value="查询"  style="display: inline-block" class="btn btn-primary"/>
                </form>


                <form action="${pageContext.request.contextPath}/book/querybook"   method="post" style="float:right; display: inline" class="form-inline">
                    <input type="text" class="form-control" name="queryBookName" placeholder="请输入要查询的用品编号"/>
                    <input type="submit" value="查询" class="btn btn-primary"/>
                </form>






            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>商品编号</th>
                    <th>商品名称</th>
                    <th>价格</th>
                    <th>数量</th>
                    <th>供货商</th>
                    <th>时间</th>
                    <th>电话</th>
                    <th>备注</th>
                </tr>
                </thead>
                <%--           书籍是从数据库中查询出来 从这个list中遍历出来：foreach--%>
                <tbody>
                <%--<c:forEach var="book" items="${requestScope.get(list)}"              --%>
                <c:forEach var="product" items="${stockpageInfo.list}">
                    <tr>
                        <td>${product.id}</td>
                        <td>${product.name}</td>
                        <td>${product.price}</td>
                        <td>${product.number}</td>
                        <td>${product.sume}</td>
                        <td><fmt:formatDate value="${product.date}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                        <td>${product.tellpone}</td>
                        <td>${product.detail}</td>
                        <td>

                            <a href="${pageContext.request.contextPath}/stock/redirectupdate?id=${product.id}" >修改</a>
                            &nbsp; | &nbsp;
                            <a href="${pageContext.request.contextPath}/stock/deletestock?id=${product.id}">删除</a>

                        </td>
                    </tr>
                </c:forEach>


                </tbody>
                <tfoot>
                <tr>
                    <td>当前页:${stockpageInfo.pageNum}</td>
                    <td><a href="${pageContext.request.contextPath}/stock/getStock?pageNum=${stockpageInfo.prePage}& pageSize=${stockpageInfo.pageSize}">前一页：${stockpageInfo.prePage}</a></td>
                    <td><a href="${pageContext.request.contextPath}/stock/getStock?pageNum=${stockpageInfo.nextPage}& pageSize=${stockpageInfo.pageSize}">下一页：${stockpageInfo.nextPage}</a></td>
                    <td><a href="${pageContext.request.contextPath}/stock/getStock?pageNum=${stockpageInfo.pages}& pageSize=${stockpageInfo.pageSize}">尾页：${stockpageInfo.nextPage}</a></td>
                    <td>一共：${stockpageInfo.pages}</td>

                </tr>
                </tfoot>
            </table>

        </div>
    </div>
</div1>